<template>
	<el-descriptions ref="ruleFormRef" :column="2" direction="vertical" v-loading="isLoading">

		<el-descriptions-item width="50%" :label='titles.id'>
			{{ isNullOrEmpty( formInline?.id ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.parentId'>
			{{ isNullOrEmpty( formInline?.parentSystemName ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.systematicName'>
			{{ isNullOrEmpty( formInline?.systematicName ) }}
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.logo'>
			<ReUpload :files='formInline.logo' isView :key="isLoading + ''"></ReUpload>
		</el-descriptions-item>
		<el-descriptions-item width="50%" :label='titles.systematicDesc' :span="2">
			<div style="white-space: pre-wrap;">{{ isNullOrEmpty( formInline?.systematicDesc ) }}</div>
		</el-descriptions-item>
	</el-descriptions>
</template>
<script setup lang="ts">
import { ref } from "vue";
import { titles } from './index';
import type { infoType } from '@/api/manage/system-management/system/index';
import ReUpload from '@/components/ReUpload/index.vue'
import { isNullOrEmpty } from "@/utils/functions"
type FormProps = {
	formInline: infoType,
	isLoading: boolean
}

const props = withDefaults(defineProps<FormProps>(), {
	formInline: () => ({} as infoType),
	isLoading: false
});

const ruleFormRef = ref();
//  const newFormInline = ref(props.formInline as any);
//
//
//  watch(()=>props.formInline,()=>{
//  	newFormInline.value = props.formInline
//  },{
//  	deep:true,
//  	immediate:true
//  })

function getRef() {
	return ruleFormRef.value;
}

defineExpose({ getRef });
</script>
